Skip to content

crypto/spiffe: use Ed25519 for SVID key generation - #145

Merged
cicoyle merged 5 commits into
dapr:mainfrom
JoshVanL:use-ed25519
Mar 10, 2026
Merged

cicoyle merged 5 commits into
dapr:mainfrom
JoshVanL:use-ed25519

Conversation

@JoshVanL

@JoshVanL JoshVanL commented Mar 6, 2026

Copy link
Copy Markdown
Member

Ed25519 is faster for signing/verifying, produces smaller keys and signatures, and has safer deterministic signing compared to ECDSA P256.

Ed25519 is faster for signing/verifying, produces smaller keys and
signatures, and has safer deterministic signing compared to ECDSA P256.

Signed-off-by: joshvanl <me@joshvanl.dev>
@JoshVanL
JoshVanL requested review from a team as code owners March 6, 2026 15:13
Copilot AI review requested due to automatic review settings March 6, 2026 15:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the SPIFFE workload identity flow (and supporting test PKI utilities) to generate Ed25519 keys instead of ECDSA P-256, aligning SVID key generation with Ed25519’s performance and signature-size benefits.

Changes:

  • Switch SPIFFE SVID private key generation to Ed25519 when creating CSRs.
  • Update test PKI generation to use Ed25519 for root/leaf keys and adjust certificate creation accordingly.
  • Adjust leaf certificate key usage to match Ed25519 signing-only semantics.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
crypto/test/pki.go Updates test PKI root/leaf key generation and certificate creation to use Ed25519.
crypto/spiffe/spiffe.go Generates Ed25519 keys for SVID CSR creation during identity fetch/rotation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread crypto/spiffe/spiffe.go Resolved
JoshVanL and others added 3 commits March 6, 2026 15:32
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Josh van Leeuwen <me@joshvanl.dev>
Standard CA certificates should include both CertSign and CRLSign
key usage to support certificate revocation list signing.

Signed-off-by: joshvanl <me@joshvanl.dev>
Signed-off-by: joshvanl <me@joshvanl.dev>
ed25519.PrivateKey is a value type ([]byte), not a struct, so taking
its address creates *ed25519.PrivateKey which is not handled by
EncodePrivateKey's type switch, causing "unsupported key type
*ed25519.PrivateKey" errors at runtime. Use the value directly.

Signed-off-by: joshvanl <me@joshvanl.dev>
@cicoyle
cicoyle merged commit 3166d61 into dapr:main Mar 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants